import { base } from '@/config'
import http from '@/utils/request'

const tagApi = {
  // 新增评价标签
  addAppraiseTag: params => {
    return http.postJson(`${base.goods}/commentLabel/add`, params)
  },
  // 编辑评价标签
  editAppraiseTag: params => {
    return http.postJson(`${base.goods}/commentLabel/edit`, params)
  },
  // 编辑是否显示
  updatedStatus: params => {
    return http.postJson(`${base.goods}/commentLabel/edit/isShow`, params)
  },
  // 获取标签列表
  getAppraiseTagList: params => {
    return http.get(`${base.goods}/commentLabel/list`, { params })
  },
  // 删除标签
  deleteAppraiseTag: id => {
    return http.post(`${base.goods}/commentLabel/remove/${id}`)
  },
  // 获取标签选择
  getTagSelectList: () => {
    return http.get(`${base.goods}/commentLabel/selectList`)
  },
  // 获取标签详情
  getAppraiseTagDetail: id => {
    return http.get(`${base.goods}/commentLabel/${id}`)
  }
}

export default tagApi
